<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $this->title;?></title>
<link rel="stylesheet" href="<?php echo $this->baseUrl;?>/files/admin/css/main.css" />
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/jquery.js"></script>
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/load.js"></script>
<!--colorbox-->
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/colorbox.jquery/jquery.colorbox.js"></script>
<link href="<?php echo $this->baseUrl;?>/files/admin/js/colorbox.jquery/colorbox2.css" rel="stylesheet" type="text/css"/>

</head>

<body style="overflow:auto;">
	<div id="main">
		<div id="topMenu">
			<div id="navigation">当前位置：版本分布</div>
			<div id="topOtherMenu"></div>
		</div>
		<div id="body">
			<div id="search">
				<form id="searchForm" name="searchForm" method="post" action="<?php echo $this->projectUrl();?>">
					<table>
						<tr>
							<td>
							<div id="timeRange">

<?php foreach($this->osnameall as $row) {?>

    <input type="radio" name="osName" value="<?php echo $row['os']; ?>" 
    <?php if($this->osName == $row['os']) echo "checked='checked'";?> 
    id="<?php echo $row['os']; ?>"/>
    <label for="<?php echo $row['os']; ?>"><?php if($row['os'] == "")echo "其他";else echo $row['os']; ?></label>
    
    &nbsp;&nbsp;

<?php
}
?>

								<input name="search" type="submit" id="search2" value="查找" class="button" />
							</div>
						  </td>
						</tr>
					</table>
				</form>
			</div>

			<div id="content">
			</div>
				<form id="listForm" name="listForm" method="post" action="">
					<table class="table reportTable">
                        <tr class="subject">
                            
                            <td rowspan="2">版本</td>
                            <td colspan="2">当前版本分布</td>
                            
                            <td colspan="2">昨日活跃</td>
							<td colspan="2">最近15天活跃</td>
							<td colspan="2">最近30天活跃</td>
                        </tr>
						<tr class="subject">
							<!-- <td>OsName</td> -->
							
							<td>用户数</td>
							<td>占比</td>
							<td>用户数</td>
							<td>占比</td>
							<td>用户数</td>
							<td>占比</td>
							<td>用户数</td>
							<td>占比</td>
						</tr>
<?php foreach($this->version as $row) { ?>
						<tr class="dataLine">
							<!-- <td><?php echo $row['osName'];?></td> -->
							<td><?php echo $row['version'];?></td>
							<td class="numberTd"><?php echo $row['currentBootAllClientNum'];?></td>
							<td class="numberTd"><?php if($this->cnt['currentBootAllClientNum']!=0)echo round($row['currentBootAllClientNum']/$this->cnt['currentBootAllClientNum']*100)."%";else echo"0%";?></td>
							<td class="numberTd"><?php if($row['dayBootClientNum']) {echo $row['dayBootClientNum'];} else{echo '0';}?></td>
							<td class="numberTd"><?php if($this->cnt["dayBootClientNum"]!=0)echo round($row['dayBootClientNum']/$this->cnt["dayBootClientNum"]*100)."%";else echo"0%";?></td>
							<td class="numberTd"><?php if($row['recentBootClientNum']) { echo $row['recentBootClientNum'];}else{echo '0';}?></td>
							<td class="numberTd"><?php if($this->cnt["recentBootClientNum"]!=0) echo round($row['recentBootClientNum']/$this->cnt["recentBootClientNum"]*100)."%";else echo"0%";?></td>
							<td class="numberTd"><?php if($row['recentBootClientNum2']) { echo $row['recentBootClientNum2'];}else{echo '0';}?></td>
							<td class="numberTd"><?php if($this->cnt["recentBootClientNum2"]!=0) echo round($row['recentBootClientNum2']/$this->cnt["recentBootClientNum2"]*100)."%";else echo"0%";?></td>
						</tr>
<?php
}
if($this->cnt['currentBootAllClientNum']) {
?>

                        <tr class="subject">
                            <td>合计</td>
                            <td><?php echo $this->cnt['currentBootAllClientNum'] ?></td>
                            <td><?php if($this->cnt["currentBootAllClientNum"]!=0)echo $this->cnt['currentBootAllClientNum']/$this->cnt['currentBootAllClientNum']*100 . "%"; else echo"0%";?></td>
                            <td><?php echo $this->cnt["dayBootClientNum"]?></td>
                            <td><?php if($this->cnt["dayBootClientNum"]!=0)echo $this->cnt["dayBootClientNum"]/$this->cnt["dayBootClientNum"]*100 . '%';else echo"0%";?></td>
                            <td><?php echo $this->cnt["recentBootClientNum"]?></td>
                            <td><?php if($this->cnt["recentBootClientNum"]!=0)echo $this->cnt["recentBootClientNum"]/$this->cnt["recentBootClientNum"]*100 . '%';else echo"0%";?></td>
                            <td><?php echo $this->cnt["recentBootClientNum2"]?></td>
                            <td><?php if($this->cnt["recentBootClientNum2"]!=0)echo $this->cnt["recentBootClientNum2"]/$this->cnt["recentBootClientNum2"]*100 . '%';else echo"0%";?></td>
                        </tr>
<?php }else {?>

<tr><td colspan='9'>暂无数据!</td></tr>
<?php }?>
					</table>
<table class="controlTable">
					  <tr>
							<td colspan="6" align="right" class="paginator"><?php echo $this->pageString;?></td>
					</tr>
					</table>
				</form>
		</div>

	</div>
</body>
</html>